package main

import (
	"dm_gin_1/controllers"
	"fmt"
	"os"

	_ "github.com/joho/godotenv/autoload"

	"github.com/gin-gonic/gin"
)

func main() {

	fmt.Printf("数据库配置信息：DB_USER: %s\n", os.Getenv("DB_USER"))

	r := gin.Default()

	userController := controllers.NewUserController()

	r.GET("/users", userController.GetUsers)
	r.GET("/users/info/:id", userController.GetUserById)

	r.Run(":8080")
}
